// -*- coding: utf-8 -*- 
/**
 * Project: Java8InActionT
 * Creator: yanking
 * Create time: 2022-02-23 15:40
 * IDE: IntelliJ IDEA
 * Introduction:
 */
package com.ThreadPool.customThreadPool;

public class myTest {
    // Testing the threadPool
    public static void main(String[] args) {
        // 1: 创建线程池类对象
        myThreadPool pool = new myThreadPool(Runtime.getRuntime().availableProcessors(), 8, 20);
        // 2: 提交多个任务
        for (int i = 0; i < 30; i++) {
            // 创建任务对象并提交给线程池
            myTask my = new myTask(i);
            pool.submit(my);
        }
    }
}
